<include file="Index/header" />

<div class="container">
	<nav class="navbar navbar-default" role="navigation">
		<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
			<ul class="nav navbar-nav">
				<li>
					<a href="?m=admin&c=goods&a=index" class="glyphicon glyphicon-arrow-right">返 回</a>
				</li>
			</ul>
			<form class="navbar-form navbar-right" action="?m=admin&c=dump&a=query" method="post" role="search">
				<div class="form-group">
					<input type="text" class="form-control" placeholder="商品名称" id="goods_name" name="goods_name" />
				</div> <button type="submit" class="btn btn-default">搜索</button>
			</form>
		</div>
	</nav>
	<!-- 商品 -->
	<div class="row">
		<foreach name="goodsInfo" item="value">
			<div class="thumbnail col-md-3">
				<img alt="300x200" src="__PUBLIC__/images/goods/{$value['pic_url']}" />
				<div class="caption">
					<h3>
						{$value['goods_name']}
					</h3>
					<p style="height: 40px; overflow: hidden;">
						{$value['goods_descript']}
					</p>
					<p class="place">￥{$value['goods_price']}</p>
					<p>
						<a class="btn btn-primary" href="?m=admin&c=goods&a=regain&dpi={$value[dump_id]}"
							onclick="return regain()">还原</a>
						<a class="btn btn-primary" href="?m=admin&c=dump&a=ddelete&dpi={$value[dump_id]}"
							onclick="return move()">删除</a>
					</p>
				</div>
			</div>
		</foreach>
	</div>
</div>
<br />
<br />
<br />
<br />
<script type="text/javascript">
	function query() {
		var name = document.getElementById('goods_name').value;
		if (name == '') {
			alert("查询商品名称不能为空!");
			return false;
		}
		return true;
	}

	function move() {
		if (window.confirm("警告，该操作会将该商品彻底删除")) {
			return true;
		}
		return false;
	}

	function regain() {
		if (window.confirm("是否还原该商品")) {
			return true;
		}
		return false;
	}
</script>
<include file="Index/footer" />